<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8"/>
    <title>ITArmy</title>
    <link rel="icon" type="image/x-icon" href="/static/images/logoIcon.icon">
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/static/css/askArticle.css"/>
</head>
<body th:style="'background-color : ' + ${session.config.color1}">
<!--顶部导航部分-->
<div class="nav">
    <!--导航居中样式-->
    <div class="navCenter">
        <div class="navLeft">
            <!--logo-->
            <div class="logo">
                <a href="/user/index"><img src="/static/images/logo.png"/></a>
            </div>
            <!--主页-->
            <div class="mainPage"><a href="/user/index">首页</a></div>

            <!--左侧未登录导航-->
            <!--下载App-->
            <div class="download" th:if="${session.user==null}"><a href="">下载App</a></div>
            <!--下载App隐藏部分-->
            <div class="downloadHide">
                <img src="/static/images/QRCode.jpg">
            </div>
            <!--左侧登录后导航将下载App换为关注和消息部分-->
            <!--关注-->
            <div class="attention" th:if="${session.user!=null}"><a href="/focus/focusInformation">关注</a></div>
            <!--消息-->
            <div class="information" th:if="${session.user!=null}"><a href="/message/getCommentMessage">消息</a></div>

            <!--搜索部分-->
            <div class="search">
                <form action="/serialize/selectBS" method="get">
                    <input type="text" name="inputName" class="navInput"/>
                    <button class="navBtn" type="submit"><i class="fa fa-search"></i></button>
                </form>
            </div>
        </div>

        <!--<a href="/user/sign">登录</a>-->
        <!--右侧导航-->
        <div class="navRight">
            <!--右侧未登录导航有登录注册部分-->
            <div class="signIn" th:if="${session.user==null}">
                <a href="/user/sign">登录</a>
            </div>
            <!--<ul>-->
            <!--<li><a th:if="${session.user==null}" href="/user/sign">登录</a></li>-->
            <!--<li><a th:if="${session.user!=null}" href="/user/loginOut">退出</a></li>-->
            <!--</ul>-->
            <div class="register" th:if="${session.user==null}"><a href="/user/registerPage">注册</a></div>
            <!--右侧已登录导航有个人信息图片部分-->
            <!--个人信息图片部分-->

            <div th:if="${session.user!=null}" class="myselfPic"><img th:src="${session.user.uHead}">
                <i class="fa fa-sort-down" id="myselfDown"></i>
                <i class="fa fa-sort-up"  id="myselfUp"></i>
            </div>
            <!--登录后显示个人信息图片下拉菜单-->
            <ul class="myselfDownList" style="padding-left: 0;margin-top: 0">
                <a href="/user/PersonalPage">
                    <li><i class="fa fa-user"></i> 个人中心</li>
                </a>
                <a href="/user/personalData">
                    <li><i class="fa fa-drivers-license-o"></i> 我的资料</li>
                </a>
                <a href="/focus/focusInformation">
                    <li><i class="fa fa-check-square-o"></i> 我的收藏</li>
                </a>
                <a href="/message/getCommentMessage">
                    <li><i class="fa fa-group"></i> 我的消息</li>
                </a>
                <li class="loginOut" style="cursor: pointer"><i class="fa fa-reply-all"></i> 退出</li>
            </ul>
            <!--写文章按钮-->
            <a href="/test/editor">
                <div class="write">写文章</div>
            </a>
        </div>
    </div>
</div>
    <div class="content">
        <div class="right">
            <div  style="overflow:hidden;float: left;">
                <div class="heard">
                    <div class="img">
                        <img th:src="${question.user.uHead}">
                    </div>
                    <div style="text-align: center">
                        <span th:text="${question.user.uName}"></span>
                    </div>
                </div>
            </div>
            <div style="float: left;margin: 34px 10px;">
                <a class="ask" href="/question/add">我要提问</a>
            </div>
        </div>

        <div class="left">
            <div style="border: 1px solid lightgray;padding: 0 12px;" >
                <h2 th:text="${question.question.qTitle}"></h2>
                <div class="article" th:utext="${question.question.qAddress}"></div>
                <div class=" sponsor">
                    <span>作者:</span>
                    <span th:text="${question.user.uName}"></span>
                    <span>编辑于:</span>
                    <span th:text="${#dates.format(question.question.qTime,'yyyy-MM-dd HH:mm')}"></span>
                    <span>赏金:</span>
                    <span th:text="${question.question.qReward}"></span>
                    <a class="speak">评论</a>
                </div>
                <div class="star">
                    <input type="text" id="star"  placeholder="评论....">
                    <button class="star-ask">评论</button>
                    <input class="qId" type="hidden" th:value="${question.question.qId}">
                </div>
            </div>
            <div class="number">
                <span th:text="${question.commentNumber}"></span>
                <span>个回答</span>
            </div>

            <div class="reply" th:each="message:${commentMessage}">
                <div class="head-img">
                    <img th:src="${message.user.uHead}">
                </div>
                <div class="reply-content">
                    <h4 th:text="${message.user.uName}"></h4>
                    <span th:text="${#dates.format(message.comment.cTime,'yyyy-MM-dd   HH:mm')}"></span>
                    <p th:text="${message.comment.cAddress}"></p>
                    <div class="speakers">
                        <div style="float: left;width:83%;height:10px;"></div>
                        <div style="float: left;width: 17%;">
                            <span class="look" style="color:#79a5e5;">查看回复</span>
                            <span th:text="${message.replyCount}" class="count"></span>
                            <span>条</span>
                            <span class="say" style="color:#79a5e5;">回复</span>
                        </div>
                    </div>
                    <div class="again" style="display: none;margin-bottom: 10px;">
                        <textarea placeholder="回复" class="word"></textarea>
                        <button class="again-reply">评论</button>
                    </div>
                    <div class="aaaa"></div>
                    <div class="reply2" style="display: none;"  th:each="reply:${message.replyMessage}" th:if="${message.user.uId}==${reply.reply.tUId}">
                        <div>
                            <div>
                                <span th:text="${reply.user.uName}"></span>回复
                                <span th:text="${message.user.uName}"></span>
                            </div>
                            <p th:text="${reply.reply.rAddress}"></p>
                            <span th:text="${#dates.format(reply.reply.rTime,'yyy-MM-dd HH:mm')}"></span>
                            <span class="speaker">回复</span>
                            <div class="again" style="display: none;margin-bottom: 10px;">
                                <textarea placeholder="回复" class="word"></textarea>
                                <button class="again-reply">评论</button>
                            </div>
                        </div>
                    </div>
                    <input class="picture" type="hidden" th:value="${message.user.uHead}">
                    <input class="uname" type="hidden" th:value="${session.user.uId}"/>
                    <input class="name" type="hidden" th:value="${message.user.uId}">
                    <input class="user" type="hidden" th:value="${session.user.uName}"/>
                    <input class="id" type="hidden" th:value="${message.comment.cId}">
                </div>
            </div>
        </div>
    </div>
<input type="hidden" class="page" value="1">

</body>
<script type="text/javascript" src="/static/js/jquery-3.4.0.js"></script>
<script type="text/javascript" src="/static/js/askArticle.js"></script>
</html>